<?php
/**
 * @author zhaofei
 * @package 关联终端
 * @createtime 20self::MODEL_BOTH4-self::MODEL_BOTHself::MODEL_BOTH-25
 * @updatetime 20self::MODEL_BOTH4-self::MODEL_BOTHself::MODEL_BOTH-25
 * @ps:
 */
namespace System\Model;
use Think\Model;
class EmStoreModel extends Model{

	protected $_validate =array(
		array('e_id','require','业务名不能为空',self::MODEL_BOTH),
		array('e_id','','已经存在！',0,'unique',self::MODEL_INSERT), // 在新增的时候 
		array('store_ids','require','必须选择终端',self::MODEL_BOTH),

	);
	
	protected $_auto = array (
		array('create_time','time',self::MODEL_INSERT,'function'),
		array('ct_by_id','getId',self::MODEL_INSERT,'callback'),
		array('update_time','time',self::MODEL_BOTH,'function'),
		array('up_by_id','getId',self::MODEL_BOTH,'callback'),
	);

	public function getId(){
		return session('id');
	}
}
?>